package com.ruiyi.adrobot.web.controller.girl;

import com.ruiyi.adrobot.beans.Girl;
import com.ruiyi.adrobot.dao.girl.GirlRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by 51102 on 2017/7/3.
 */
@RestController
public class GirlController {
    @Autowired
    private GirlRepository girlRepository;

    @GetMapping("/girls")
    public List<Girl> girlList() {
        girlRepository.save(new Girl(3));
        return girlRepository.findAll();
    }
}
